<template>
  <div class="date-picker-view">
    <c-date-picker @select="selectedDate"></c-date-picker>
    <p class="p">选中的时间：{{ time }}</p>
  </div>
</template>
<script>
import cDatePicker from '@/components/datePicker.vue'

export default {
  name: 'DatePicker',
  components: {
    cDatePicker
  },
  data() {
    return {
      time: '未选中时间'
    }
  },
  methods: {
    selectedDate(date) {
      this.time = date
    }
  }
}
</script>
<style lang="scss" scoped>
.p {
  font-size: 20px;
  padding: 20px 0;
  font-weight: 600;
}
</style>
